package com.squirrel.michale;

import java.util.HashSet;
import java.util.Set;

/**
 * @author guanhao 观浩
 * @version 1.0.0.0
 * @createTime 2023/2/27 9:30 PM
 * @company Michale Squirrel
 * @link
 * @description
 */
public class LeetCode2442 {

    public int countDistinctIntegers(int[] nums) {
        Set<Integer> visited = new HashSet<>();
        for (int x: nums){
            visited.add(x);
            String cur = new StringBuilder("" + x).reverse().toString();
            int y = Integer.parseInt(cur);
            visited.add(y);
        }

        return visited.size();
    }

}
